home *** CD-ROM | disk | FTP | other *** search
- Path: interramp.com!usenet
- From: "James A. Clifton" <jclifton@interramp.com>
- Newsgroups: comp.lang.c
- Subject: Help referencing an array of strings
- Date: Tue, 05 Mar 1996 12:50:58 -0500
- Organization: Ethnohistory Associates
- Message-ID: <313C7F02.5D54@interramp.com>
- NNTP-Posting-Host: ip72.kalamazoo.mi.interramp.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; U)
-
- I need to have an array of fixed-length strings in a structure.
- The problem I am having is trying to reference a particular string
- in the array:
-
- typedef struct ss {
- /* some other data */
- char sa[N][M];
- } ss;
-
- ss s;
-
- Now how do I reference the Nth string???
-
- I know how to reference the Mth character in the Nth string:
-
- s.sa[n][m]
-
- But not the Nth entire string, I've tryed:
-
- s.sa[n][] and *s.sa[n] but neither works.
-
- Post or reply to: jclifton@interramp.com
-
- Thanks.
-